import 'package:flutter/material.dart';
import './components/01_无状态组件.dart';
import './components/02_有状态组件.dart';
import './components/03_组件生命周期.dart';
import './components/04_Flutter常用组件_Container.dart';
import './components/05_Text组件.dart';
import './components/06_网络图片.dart';
import './components/07_线性布局_Column组件.dart';
import './components/08_线性布局Row.dart';
import './components/09_弹性布局_Expanded.dart';
import './components/10_层叠布局Stack.dart';
import './components/11_综合案例.dart';
import './components/12_滚动组件.dart';
import './components/13_builder构造函数.dart';
import './components/14_separated构造函数.dart';
import './components/15_GridView构造函数.dart';
import './components/16_Dio发送请求.dart';
import "./components/17_订单案例.dart";
void main() {
  // 1. 启动项目, 并传入根组件实例对象
  runApp(MaterialApp(
    home: Scaffold(
      // 1.1 导航
      appBar: AppBar(
        backgroundColor: Colors.pink,
        title: const Text('Hello Flutter'),
      ),
      // 1.2 主体部分
      body: const DioDemo(),
    ),
  ));
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const Center(
      child: Text(
        'Hello, Flutter',
        textDirection: TextDirection.ltr,
        style: TextStyle(
            fontSize: 30.0, color: Colors.red, fontWeight: FontWeight.bold),
      ),
    );
  }
}